﻿<?php
$title = '课表查询';
$jquery = 1;
$jquery_mobile = 1;
$md5 = 1;
$min_js = 'curriculum';
$min_css = 'curriculum_css';
$url = '/wechat-curriculum/';
	
include_once("../common/header.php");
?>

<body>

<section data-role="page" id="default">
	<div data-role="content">
	</div>
	<div data-role="footer" data-position="fixed" data-theme="b" data-type="horizontal">
		<h2>课表助手@wit-helper</h2>
	</div>
</section>

<section data-role="page" id="firstTime">
	<div data-role="content">
		<form class="studentIdForm">
			<label for="studentId">学号：</label>
			<input type="text" name="studentId" id="studentId" placeholder="请输入学号"/>
			<center>
				<a data-role="button" id="submit" href="#" data-theme="b">提交</a>
			</center>
		</form>
	</div>
	<div data-role="footer" data-position="fixed" data-theme="b" data-type="horizontal">
		<h2>课表助手@wit-helper</h2>
	</div>
</section>

<?php
$week = array(
	array("Sunday", "周日"),
	array("Monday", "周一"),
	array("Tuesday", "周二"),
	array("Wednesday", "周三"),
	array("Thursday", "周四"),
	array("Friday", "周五"),
	array("Saturday", "周六")
);


for($i = 0; $i <= 6; $i++){
?>
<section data-role="page" id="<?php echo $week[$i][0]; ?>">
	<div class="floatBtn">
		<a href="#" class="refresh" data-role="button" data-theme="b">刷新数据</a>
	</div>
	<header data-role="header" data-position="fixed" data-add-back-btn="false" data-back-btn-text="返回" data-theme="b" data-type="horizontal">
		<div data-role="navbar">
			<ul>
				<li><a href="#<?php if($i==0){echo $week[6][0];}else{echo $week[$i-1][0];}?>" data-transition="slide" data-direction="reverse"><?php if($i==0){echo $week[6][1];}else{echo $week[$i-1][1];}?>←</a></li>
				<li><a href="#" class="ui-btn-active"><?php echo $week[$i][1]; ?></a></li>
				<li><a href="#<?php if($i==6){echo $week[0][0];}else{echo $week[$i+1][0];}?>" data-transition="slide">→<?php if($i==6){echo $week[0][1];}else{echo $week[$i+1][1];}?></a></li>
			</ul>
		</div>
	</header>
	
	<div data-role="content">
		<ul data-role="listview" data-split-icon="gear" data-split-theme="a" data-inset="true" class="curriculumContent" id="<?php echo $week[$i][0]; ?>List">
			
		</ul>
	</div>
	
	<div data-role="footer" data-position="fixed" data-theme="b" data-type="horizontal">
		<h2>课表助手@wit-helper</h2>
	</div>
</section>
<?php
}
?>

<a href="#warningDialog" data-rel="dialog" data-transition="pop" id="warning"></a>
<section data-role="dialog" data-theme="b" data-close-btn="none" id="warningDialog">
	<div data-role="header">
		<h1>错误</h1>
	</div>
	<div data-role="content">
		<p id="warningText">数据载入错误</p>
		<a data-role="button" href="#default">确定</a>
	</div>
</section>

</body>
</html>
